// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router'
import Home from '../pages/Home.vue'
import ArticleList from '../pages/ArticleList.vue'
import ArticleDetail from '../pages/ArticleDetail.vue'
import About from '../pages/About.vue'
import Admin from '../pages/Admin.vue'

const routes = [
  { path: '/', name: 'Home', component: Home },
  { path: '/articles', name: 'ArticleList', component: ArticleList },
  { path: '/articles/:id', name: 'ArticleDetail', component: ArticleDetail },
  { path: '/about', name: 'About', component: About },
  { path: '/admin', name: 'Admin', component: Admin },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router